package com.yami.shop.security.api.model;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.Collections;

/**
 * <p>
 * 
 * </p>
 *
 * @author xch
 * @since 2021-07-01
 */
@Data
public class YamiSubmitPerson implements UserDetails {

    /**
     * 提报人id
     */
    private String submitPersonId;

    /**
     * 提报人手机号
     */
    private String mobile;

    /**
     * 提报人状态 1正常 0 删除
     */
    private String status;

    /**
     * 提报人登录成功标识（提报人登录400异常失败抛出异常，前端会跳转到用户登录页面），和前端沟通暂用这种标识的方式。
     */
    private Boolean loginResFlag;

    /**
     * 错误信息
     */
    private String errorMes;


    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return Collections.emptyList();
    }
    @Override
    public String getPassword() {
        return null;
    }

    @Override
    public String getUsername() {
        return null;
    }

    @Override
    public boolean isAccountNonExpired() {
        return true;
    }

    @Override
    public boolean isAccountNonLocked() {
        return true;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return true;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }
}
